#include <iostream>
#include <string>
using namespace std;

class ReadString
{
public:
    ReadString(istream &is) : in(is) {}
    string operator()()
    {
        string line;
        if (!getline(in, line))
        {
            line = " ";
        }
        return line;
    }

private:
    istream &in;
};

int main()
{
    ReadString rs(cin);
    string s = rs();
    while (s != "q")
    {
        cout << s << endl;
        s = rs();
    }
}